package org.jawa.exam.model;

import org.jawa.core.cache.CacheSizes;
import org.jawa.core.cache.Cacheable;
import org.jawa.core.cache.CannotCalculateSizeException;

/**
 * 
 * 类文件: PaperQuestion
 * <p>
 * <p>
 * 类描述：试卷试题表
 * <p>
 * 作     者： migrant423
 * <p>
 * 日     期： 2012-7-16
 * <p>
 * 时     间： 下午8:24:25
 * <p>
 */
public class PaperQuestion implements Cacheable {

	private static final long serialVersionUID = 9153141143652924818L;
	/**
	 * 试卷编号
	 */
	private Long paperId;
	/**
	 * 试题编号
	 */
	private Long questionId;
	/**
	 * 试题分值
	 */
	private double questionScore;
	/**
	 * 答题限时
	 */
	private int questionTime;
	
	public Long getPaperId() {
		return paperId;
	}

	public void setPaperId(Long paperId) {
		this.paperId = paperId;
	}

	public Long getQuestionId() {
		return questionId;
	}

	public void setQuestionId(Long questionId) {
		this.questionId = questionId;
	}

	public double getQuestionScore() {
		return questionScore;
	}

	public void setQuestionScore(double questionScore) {
		this.questionScore = questionScore;
	}

	public int getQuestionTime() {
		return questionTime;
	}

	public void setQuestionTime(int questionTime) {
		this.questionTime = questionTime;
	}

	public int getCachedSize() throws CannotCalculateSizeException {
		int size = 0;
		size += CacheSizes.sizeOfObject();
		size += CacheSizes.sizeOfLong();
		size += CacheSizes.sizeOfLong();
		size+= CacheSizes.sizeOfDouble();
		size+=CacheSizes.sizeOfInt();
		return size;
	}

}
